<template>
          <img src="../../assets/logo.png" />
    <el-container>
        <el-aside width="5%">

        </el-aside>
        <el-container style="min-height: 105vh;">
            <el-header>

            </el-header>
            <el-main>
                <div class="common-layout">
                    <el-container>
                        <el-aside width="15%" style="margin-right: 5px;">
                            <el-row class="tac">
                                <el-col :span="24">
                                    <h3 class="mb-2">CodeSky 教师管理面板</h3>
                                    <el-menu default-active="/teacher/studentList" class="el-menu-vertical-demo"
                                        @open="handleOpen" router @close="handleClose">

                                        <el-menu-item index="/teacher/classList">
                                            <el-icon>
                                                <UserFilled />
                                            </el-icon>
                                            <span>班级管理</span>
                                        </el-menu-item>
                                        <el-menu-item index="/teacher/manageStudent">
                                            <el-icon>
                                                <CirclePlusFilled />
                                            </el-icon>
                                            <span>添加班级</span>
                                        </el-menu-item>

                                        <el-menu-item index="/teacher/manageWork">
                                            <el-icon>
                                                <QuestionFilled />
                                            </el-icon>
                                            <span>作业管理</span>
                                        </el-menu-item>
                                        <el-menu-item index="/teacher/publishWork">
                                            <el-icon>
                                                <CirclePlusFilled />
                                            </el-icon>
                                            <span>发布作业</span>
                                        </el-menu-item>
                                    </el-menu>
                                </el-col>

                            </el-row>
                        </el-aside>
                        <el-main :style="{
                            boxShadow: `var(${getCssVarName('dark')})`,
                        }">
                            <router-view></router-view>
                        </el-main>
                    </el-container>
                </div>

            </el-main>
            <el-footer>
            </el-footer>
        </el-container>
        <el-aside width="5%"></el-aside>
    </el-container>
</template>
  
<script lang="ts" setup>
import {
    Menu as IconMenu,
    UserFilled,
    Medal,
    CirclePlusFilled,
    QuestionFilled,
    DataLine,
    FolderAdd,
} from '@element-plus/icons-vue'
import { ref, onMounted } from 'vue'
import emitter from "@/lib/bus";
import { MittRouterNameSpace } from "@/lib/type";
import { useRouter } from "vue-router";
const router = useRouter()
const currentUrl = router.currentRoute.value.fullPath

console.log(currentUrl);
onMounted(() => {
    emitter.emit(MittRouterNameSpace.ChangeRouter, "/admin/setting");
})

const getCssVarName = (type: string) => {
    return `--el-box-shadow${type ? '-' : ''}${type}`
}
const handleOpen = (key: string, keyPath: string[]) => {
}
const handleClose = (key: string, keyPath: string[]) => {
}
</script>
  